package com.ostrich.cloud.ostrichGoodsService.common.exception;

import com.ostrich.cloud.common.resultcode.ResultCode;

public enum OstrichGoodsExceptionCode implements ResultCode {
    TYPE_GET_EXCEPTION(2001,"没有查询到分类，请先添加分类"),
    GOODS_GET_EXCEPTION(2500,"没有查询到商品"),
    TYPE_DEL_DB_EXCEPTION(2002,"系统异常"),
    TYPE_DEL_SON_EXCEPTION(2003,"分类下还存在二级分类，删除失败"),
    TYPE_DEL_GOODS_EXCEPTION(2004,"分类下还存在商品，删除失败"),
    GOODS_PARAM_EXCEPTION(2501,"请选择商品"),
    SALES_GET_EXCEPTION(2601,"没有查询到流水"),
    SEC_KILL_CLOSE_EXCEPTION(2602,"秒杀任务关闭异常"),
    SEC_KILL_NOTHING_EXCEPTION(2603,"目前没有秒杀商品"),
    NOT_USER_EXCEPTION(2604,"用户还未登录"),
    COPY_BUY_SEC_GOODS(2605,"重复抢购商品异常"),
    STOCK_DEC_EXCEPTION(2607,"库存扣减异常"),
    SEC_KILL_NO_SUCCESS(2608,"下次加油,还差一点就抢到了"),
    DELETE_SEC_KILLS_ORDER_EXCEPTION(2609,"删除订单异常"),
    FAST_EXCEPTION(2610,"抢够异常，系统太繁忙"),
    DELETE_SEC_KILL_ORDER_EXCEPTION(2609,"删除订单异常"),
    PARTICIPATE_IN_SPELL_GROUP_ERROR(2701,"参与拼团失败，人数过多"),
    STOCK_ZERO_EXCEPTION(2702,"库存为零，拼团失败");



    private int code;
    private String message;

    private OstrichGoodsExceptionCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
}
